home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 1.4 KB | 40 lines | [TEXT/GEOL] |
- Item 2448244 19-Feb-91 12:14PST
-
- From: PEMD CH DEV PEMD Group, Zurich,IDV
-
- To: MACAPP.TECH$ MacApp Technical
-
- ------------------------------------------------------------------------------
-
- Sub: Write/Read Problem
-
- Hi Everyone,
-
- We're having a problem reading and writing accurately to disk. Thers is an
- array defined as follows:
- aDataArray: ARRAY[1..kMaxPoints] of String[kMaxDataLength];
- where kMaxPoints=400.
-
- The array is written to the data fork in the DoWrite method using:
- Count:=(kMaxDataLength+1)*(fNumberTimeUnits);
- FailOSErr(FSWrite(aRefNum,Count,@aDataArray));
- where kMaxDataLength=10.
-
- It is read from the disk in the DoRead method using:
- Count:=(kMaxDataLength+1)*(fNumberTimeUnits);
- FailOSErr(FSRead(aRefNum,Count,@aDataArray));
-
- When fNumberTimeUnits=7 everything works fine: the data when read back in are
- accurate. However when fNumberTimeUnits=25, the last 2 elements of the array
- are garbage; when fNumberTimeUnits=70, the last 4 elements of the array are
- garbage, and when fNumberTimeUnits=400 the last 31 elements of the array are
- garbage. The problem is always and only with the last elements of the array.
-
- Can anyone give me an idea of what I'm doing wrong here?
-
- Thanks,
- Ernie Rosenberg
-
- Configuration: Mac IIx, MPW 3.1, MacApp 2.0.1, system 6.0.7
-
-